﻿
    using Chain.BLL;
    using Chain.Common.DEncrypt;
    using Chain.Model;
    using System;
    using System.Text.RegularExpressions;
    using System.Web;
    using System.Web.UI;

    public partial class changepsw : Page
    {
        protected bool emptypsw;

        protected void Page_Load(object sender, EventArgs e)
        {
            bool login = true;
            HttpCookie wxMem = base.Request.Cookies["uid"];
            if ((wxMem != null) && Regex.IsMatch(wxMem.Value, @"^\d+$"))
            {
                Chain.Model.Mem model = new Chain.BLL.Mem().GetModel(int.Parse(wxMem.Value));
                if (model != null)
                {
                    login = false;
                    this.emptypsw = model.MemPassword == DESEncrypt.Encrypt("");
                }
            }
            if (login)
            {
                base.Response.Redirect("login.aspx");
            }
        }
    }


